<!--
 * @Author      : ZhouQiJun
 * @Date        : 2025-11-06 13:00:51
 * @LastEditors : ZhouQiJun
 * @LastEditTime: 2025-11-07 18:10:57
 * @Description :
-->
<template>
  <button @click="onAddCount" class="remote-button">
    Remote Button: {{ props.msg}} {{ count }}
  </button>
  <!--<TButton @click="onAddCount">{{ props.msg }}: {{ countStore.count }}</TButton>-->
</template>

<script setup>
import { ref } from 'vue'
//import { Button as TButton } from 'tdesign-vue-next'
//import { useCountStore } from './stores'
//const {count,addCount} =useCount()
//const countStore =useCountStore()
const props = defineProps({
  msg:{
    type:String,
    default:'TButton'
  }
})
const emits = defineEmits(['click-on'])
const count = ref(0)
function onAddCount(){
  count.value +=1
  //console.log({count:count.value},'zqj')
  //countStore.addCount()
  emits('click-on', count.value)
}
</script>

<style>
.remote-button {
  background: #42b983;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
</style>
